{% extends "base.html" %}
{% load djblets_deco %}
{% load djblets_utils %}
{% load i18n %}

{% block title %}{% trans "Log in" %}{% endblock %}

{% block content %}
{% box "important" %}
{% ifequal siteconfig.settings.auth_backend "builtin" %}
{%  definevar "register_url" %}{% url register %}{% enddefinevar %}
<h1>{% trans "New user?" %}</h1>
 <p>
 {% blocktrans %}If you don't yet have an account, you'll need to <a href="{{register_url}}">register</a> one. It will only take a minute.{% endblocktrans %}
 </p>
{% else %}
<h1>{% trans "Log in with your standard username and password" %}</h1>
 <p>
 {% blocktrans %}There's no need to register a new account. Your standard username and password should work fine.{% endblocktrans %}
 </p>
{% endifequal %}
{% endbox %}

{% box "loginform" %}
<form method="post" action=".">
 <h1 class="title">{% trans "Log In" %}</h1>
 <div class="main">
 {% if error %}
 {%  errorbox %}
 {{ error }}
 {%  enderrorbox %}
 {% endif %}
 <input type="hidden" name="next_page" value="{{next_page}}"></input>
 <table>
  <tr>
   <td class="label"><label for="id_username">{% trans "Username:" %}</label></td>
   <td class="field"><input type="text" name="username" id="id_username" /></td>
  </tr>
  <tr>
   <td class="label"><label for="id_password">{% trans "Password:" %}</label></td>
   <td class="field"><input type="password" name="password" id="id_password" /></td>
  </tr>
  <tr>
   <td>&nbsp;</td>
   <td class="field"><input type="submit" value="{% trans "Log in" %}" /></td>
  </tr>
 </table>
 </div>
</form>
{% endbox %}

{% endblock %}
